Skip to content

Binding L3/R3 on Joystick (+ L3 can call Speed Mode) - #1358

Open
DV666 wants to merge 22 commits into
Albeoris:mainfrom
DV666:BindL3R3
Open

DV666 wants to merge 22 commits into
Albeoris:mainfrom
DV666:BindL3R3

Conversation

@DV666

@DV666 DV666 commented Feb 11, 2026 •

Copy link
Copy Markdown
Collaborator

Small PR to allow binding L3 and R3 buttons, regardless of the controller used (hopefully?).

By default, these buttons remain unbound because the KeyCode varies significantly depending on the connected controller/driver.
Therefore, I added an option in the game menu allowing players to manually bind these buttons.
This new option in the Configuration Menu only appear if a joystick is activated.

2026-02-11.21-34-05.mp4

L3 and R3 can now be accessed via:

HonoInputManager.Instance.IsL3Pressed()

HonoInputManager.Instance.IsR3Pressed()

If needed, L3/R3 can be unbound in the same menu by pressing Escape.

Why this feature? It allows mapping Speed Mode (F1 on Keyboard) to the L3 button on the controller, which is a massive Quality of Life improvement in my opinion.

Maybe we should add an option in Memoria.ini to toggle this default L3 binding for Speed Mode?

@WarpedEdge

WarpedEdge commented Feb 11, 2026 via email

Copy link
Copy Markdown
Contributor

@DV666

DV666 commented Feb 11, 2026

Copy link
Copy Markdown
Collaborator Author

Will this allow rebinding the dual language someone recently mentioned in the future? I saw the file, but that seemed to be locked to CapsLock specifically. Just wondering.

It has nothing to do with this current PR, but it's something we can do, yes. Maybe in #1255

@WarpedEdge

WarpedEdge commented Feb 11, 2026 via email

Copy link
Copy Markdown
Contributor

@DV666
DV666 marked this pull request as draft February 28, 2026 16:19
@WarpedEdge

Copy link
Copy Markdown
Contributor

Hey DV, I am looking into something, but regarding these new custom buttons that aren't part of the Vanilla experience. We can def keep them here, but I was wondering if it would have been better to create a "Mod Options" section under the Config Menu in the main party screen that is a clone of the Config menu, but blanked out. Then within this config menu Memoria options that have been added like this one would appear in the list of options. Modders could then create mod options that are indexed based on mod priority where as Memoria options always first, but then based on what mod is higher on priority appears after. So to put it as an example EchoS9 mod adds to the Config menu currently a Voice volume bar, that would need to be made instead into this Mod Options section where it appears under there, and if another mod adds a new setting, but is a lower priority than EchoS it appears under their voice volume option, or vice versa if it was higher. Does this make sense? That way new options are all housed in one location and modders then have an avenue to add their own options into there, maybe using a template of different kinds of options to use or something. Just a thought and I wanted to research it myself too, to figure it out, but does something like this seam feasible in the long run?

@DV666

DV666 commented Oct 19, 2026

Copy link
Copy Markdown
Collaborator Author

Okay, so it's time to finalize this PR... and I'm pretty happy with what I figured out tonight (spend many hours on that recently).
I completely rewrote the PR from scratch, removing the whole L3 R3 button from the config menu... in fact, XInputDotNetPure does recognize the L3/R3 buttons, but only if Steam Input is enabled!

Otherwise, with my PS5 controller, it seems that the L2/R2 buttons are used for Buttons.LeftStick and Buttons.RightStick.
My previous solution using Unity.Input worked pretty well… except when the controller was unplugged and then plugged back in while the game was running: Unity would lose track of the controller, and nothing would work anymore (the menu and, most importantly, the L3/R3 buttons).

Now, with this much more streamlined PR, XInputDotNetPure handles all of this perfectly!

I added a little bonus (something I wanted to do from the start): you can bind cheats in the Memoria.ini file to these buttons.
By default, you have:

L3BindCheat = HighSpeedMode
R3BindCheat = TurboDialog

But you can also do:

L3BindCheat = Attack9999
R3BindCheat = NoRandomEncounter

You can use both L3 and R3 for the same cheat.

@DV666
DV666 marked this pull request as ready for review October 19, 2026 23:38
@DV666

DV666 commented Oct 20, 2026

Copy link
Copy Markdown
Collaborator Author

So, I'm taking back what I did: Steam Input isn't required because I found the culprit (about why L2/R2 are bind to L3/R3).

There had been a binding issue in GamePad.cs for quite some time: ZL and ZR were assigned to LeftThumb and RightThumb... but that's a mistake.

ZL and ZR correspond to L2/R2,
while LeftThumb and RightThumb are actually L3/R3.

After correcting this, everything works perfectly!

So now it looks like this:

L1/R1 => LeftShoulder / RightShoulder
L2/R2 => bLeftTrigger / bRightTrigger
L3/R3 => LeftThumb / RightThumb

Tested with and without Steam Input : working great !
Also, i change the Memoria.ini to specify something : the player don't have to set a cheat for L3BindCheat and R3BindCheat.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants